home *** CD-ROM | disk | FTP | other *** search
/ Power DOS 1996 July / Power DOS - July 1996.iso / sound / c_labs / nt / sb_nt.exe / OEMSETUP.INF < prev    next >
INI File  |  1995-09-08  |  16KB  |  542 lines

  1. [Identification]
  2.     OptionType = SCSI
  3.  
  4. [LanguagesSupported]
  5.     ENG
  6.  
  7.  
  8. ;-----------------------------------------------------------------------
  9. ; OPTION LIST
  10. ; -----------
  11. ; This section lists the Option key names.  These keys are locale
  12. ; independent and used to represent the option in a locale independent
  13. ; manner.
  14. ;
  15. ;-----------------------------------------------------------------------
  16.  
  17. [Options]
  18.     "SBCDNT"    = SbcdNt
  19.  
  20. ;-----------------------------------------------------------------------
  21. ; OPTION TEXT SECTION
  22. ; -------------------
  23. ; These are text strings used to identify the option to the user.  There
  24. ; are separate sections for each language supported.  The format of the
  25. ; section name is "OptionsText" concatenated with the Language represented
  26. ; by the section.
  27. ;
  28. ;-----------------------------------------------------------------------
  29.  
  30. [OptionsTextENG]
  31.     "SBCDNT"    = "CD-ROM driver for Sound Blaster Card"
  32.  
  33.  
  34. ;-----------------------------------------------------------------------------------------
  35. ; SCSI MINIPORT DRIVERS:
  36. ;
  37. ; Order of the information:
  38. ;
  39. ; Class driver = Type, Group, ErrorControl, Tag, EventMessageFile, TypesSupported
  40. ;
  41. ;-----------------------------------------------------------------------------------------
  42.  
  43. [MiniportDrivers]
  44.     SbcdNt  = !SERVICE_KERNEL_DRIVER, "SCSI Miniport", !SERVICE_ERROR_NORMAL,  17, %SystemRoot%\System32\IoLogMsg.dll , 7
  45.  
  46. ;---------------------------------------------------------------------------
  47. ; 1. Identify
  48. ;
  49. ; DESCRIPTION:   To verify that this INF deals with the same type of options
  50. ;                as we are choosing currently.
  51. ;
  52. ; INPUT:         None
  53. ;
  54. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  55. ;                $($R1): Option Type (COMPUTER ...)
  56. ;                $($R2): Diskette description
  57. ;---------------------------------------------------------------------------
  58.  
  59. [Identify]
  60.     ;
  61.     ;
  62.     read-syms Identification
  63.  
  64.     set Status     = STATUS_SUCCESSFUL
  65.     set Identifier = $(OptionType)
  66.     set Media      = #("Source Media Descriptions", 1, 1)
  67.  
  68.     Return $(Status) $(Identifier) $(Media)
  69.  
  70.  
  71.  
  72. ;------------------------------------------------------------------------
  73. ; 2. ReturnOptions:
  74. ;
  75. ; DESCRIPTION:   To return the option list supported by this INF and the
  76. ;                localised text list representing the options.
  77. ;
  78. ;
  79. ; INPUT:         $($0):  Language used. ( ENG | FRN | ... )
  80. ;
  81. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  82. ;                                STATUS_NOLANGUAGE
  83. ;                                STATUS_FAILED
  84. ;
  85. ;                $($R1): Option List
  86. ;                $($R2): Option Text List
  87. ;------------------------------------------------------------------------
  88.  
  89. [ReturnOptions]
  90.     ;
  91.     ;
  92.     set Status        = STATUS_FAILED
  93.     set OptionList     = {}
  94.     set OptionTextList = {}
  95.  
  96.     ;
  97.     ; Check if the language requested is supported
  98.     ;
  99.     set LanguageList = ^(LanguagesSupported, 1)
  100.     Ifcontains(i) $($0) in $(LanguageList)
  101.     goto returnoptions
  102.     else
  103.     set Status = STATUS_NOLANGUAGE
  104.     goto finish_ReturnOptions
  105.     endif
  106.  
  107.     ;
  108.     ; form a list of all the options and another of the text representing
  109.     ;
  110.  
  111. returnoptions = +
  112.     set OptionList     = ^(Options, 0)
  113.     set OptionTextList = ^(OptionsText$($0), 1)
  114.     set Status         = STATUS_SUCCESSFUL
  115.  
  116. finish_ReturnOptions = +
  117.     Return $(Status) $(OptionList) $(OptionTextList)
  118.  
  119.  
  120. ;
  121. ; 3. InstallOption:
  122. ;
  123. ; FUNCTION:  To copy files representing Options
  124. ;            To configure the installed option
  125. ;            To update the registry for the installed option
  126. ;
  127. ; INPUT:     $($0):  Language to use
  128. ;            $($1):  OptionID to install
  129. ;            $($2):  SourceDirectory
  130. ;            $($3):  AddCopy  (YES | NO)
  131. ;            $($4):  DoCopy   (YES | NO)
  132. ;            $($5):  DoConfig (YES | NO)
  133. ;
  134. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  135. ;                            STATUS_NOLANGUAGE |
  136. ;                            STATUS_USERCANCEL |
  137. ;                            STATUS_FAILED
  138. ;
  139.  
  140. [InstallOption]
  141.  
  142.     set Status = STATUS_FAILED
  143.     set DrivesToFree = {}
  144.  
  145.     set Option   = $($1)
  146.     set SrcDir   = $($2)
  147.     set AddCopy  = $($3)
  148.     set DoCopy   = $($4)
  149.     set DoConfig = $($5)
  150.  
  151.     set LanguageList = ^(LanguagesSupported, 1)
  152.     Ifcontains(i) $($0) in $(LanguageList)
  153.     else
  154.     set Status = STATUS_NOLANGUAGE
  155.     goto finish_InstallOption
  156.     endif
  157.     read-syms Strings$($0)
  158.  
  159.     set OptionList = ^(Options, 0)
  160.     ifcontains $(Option) in $(OptionList)
  161.     else
  162.     Debug-Output "SCSI.INF: SCSI option is not supported."
  163.     goto finish_InstallOption
  164.     endif
  165.     set OptionList = ""
  166.  
  167.  
  168.     set MiniportDriver   =   #(Options,         $(Option),         1)
  169.     set Type             = $(#(MiniportDrivers, $(MiniportDriver), 1))
  170.     set Group            =   #(MiniportDrivers, $(MiniportDriver), 2)
  171.     set ErrorControl     = $(#(MiniportDrivers, $(MiniportDriver), 3))
  172.     set Tag              =   #(MiniportDrivers, $(MiniportDriver), 4)
  173.     set EventMessageFile =   #(MiniportDrivers, $(MiniportDriver), 5)
  174.     set TypesSupported   =   #(MiniportDrivers, $(MiniportDriver), 6)
  175.  
  176.     set Start            =   $(!SERVICE_SYSTEM_START)
  177.     shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  178.     ifint $($ShellCode) == $(!SHELL_CODE_OK)
  179.     ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
  180.         ifstr(i) $($R1) == $(!SERVICE_BOOT_START)
  181.         set Start = $(!SERVICE_BOOT_START)
  182.         endif
  183.     endif
  184.     endif
  185.  
  186. installtheoption = +
  187.  
  188.     ifstr(i) $(AddCopy) == "YES"
  189.     set DoActualCopy = NO
  190.     set FileToCheck = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  191.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
  192.     ifstr(i) $(STATUS) == NO
  193.         set DoActualCopy = YES
  194.     endif
  195.  
  196.     ifstr(i) $(DoActualCopy) == NO
  197.         shell "subroutn.inf" DriversExist $($0) $(String1)
  198.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  199.         Debug-Output "SCSI.INF: shelling DriversExist failed"
  200.         goto finish_InstallOption
  201.         endif
  202.  
  203.         ifstr(i) $($R0) == STATUS_CURRENT
  204.         else-ifstr(i) $($R0) == STATUS_NEW
  205.         set DoActualCopy = YES
  206.         else-ifstr(i) $($R0) == STATUS_USERCANCEL
  207.         Debug-Output "SCSI.INF: User cancelled SCSI installation"
  208.         goto finish_InstallOption
  209.         else
  210.         Debug-Output "SCSI.INF: Error reported in DriversExist routine in SUBROUTN.INF"
  211.         goto finish_InstallOption
  212.         endif
  213.     endif
  214.  
  215.     ifstr(i) $(DoActualCopy) == YES
  216.  
  217.         shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
  218.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  219.         Debug-Output "SCSI.INF: shelling DoAskSourceEx failed"
  220.         goto finish_InstallOption
  221.         endif
  222.  
  223.         ifstr(i) $($R0) == STATUS_SUCCESSFUL
  224.         set SrcDir = $($R1)
  225.         ifstr(i) $($R2) != ""
  226.             set DrivesToFree = >($(DrivesToFree), $($R2))
  227.         endif
  228.         else
  229.         Debug-Output "SCSI.INF: User cancelled asking source."
  230.         goto finish_InstallOption
  231.         endif
  232.  
  233.         install Install-AddCopyOption
  234.         ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
  235.         Debug-Output "Adding SCSI files to copy list failed"
  236.         goto finish_InstallOption
  237.         endif
  238.     else
  239.         set DoCopy = NO
  240.     endif
  241.  
  242.     endif
  243.  
  244.     ifstr(i) $(DoCopy) == "YES"
  245.     read-syms ProgressCopy$($0)
  246.     install Install-DoCopyOption
  247.     ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
  248.         Debug-Output "Copying files failed"
  249.         goto finish_InstallOption
  250.     else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
  251.         set Status = STATUS_USERCANCEL
  252.         goto finish_InstallOption
  253.     endif
  254.     endif
  255.  
  256.     ifstr(i) $(DoConfig) == "YES"
  257.     ;
  258.     ; first run a privilege check on modifying the setup node
  259.     ;
  260.  
  261.     shell "registry.inf" CheckSetupModify
  262.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  263.         goto finish_InstallOption
  264.     endif
  265.  
  266.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  267.         goto finish_InstallOption
  268.     endif
  269.  
  270.     ;
  271.     ; then make a new SCSI entry, the entry is created automatically
  272.     ; enabled
  273.     ;
  274.  
  275.     set ServiceNode   = $(MiniportDriver)
  276.     set ServiceBinary = %SystemRoot%\System32\drivers\#(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  277.  
  278.     set ServicesValues   = { +
  279.         {Type,           0, $(!REG_VT_DWORD),     $(Type)                  }, +
  280.         ;{Start,          0, $(!REG_VT_DWORD),     $(Start)                 }, +
  281.         {Start,          0, $(!REG_VT_DWORD),     0                        }, +      
  282.         {Group,          0, $(!REG_VT_SZ),        $(Group)                 }, +
  283.         {ErrorControl,   0, $(!REG_VT_DWORD),     $(ErrorControl)          }, +
  284.         {Tag,            0, $(!REG_VT_DWORD),     $(Tag)                   }, +
  285.         {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary)         }  +
  286.         }
  287.     set ParametersValues = ""
  288.     set DeviceValues     = {}
  289.     set EventLogValues   = { +
  290.         {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
  291.         {TypesSupported,   0, $(!REG_VT_DWORD),     $(TypesSupported)   }  +
  292.         }
  293.  
  294.     shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  295.                         $(ServicesValues)   +
  296.                         $(ParametersValues) +
  297.                         $(DeviceValues)     +
  298.                         $(EventLogValues)   +
  299.                         Parameters
  300.  
  301.  
  302.  
  303.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  304.         Debug-Output "Couldn't execute MakeServicesEntry in registry.inf"
  305.         goto finish_InstallOption
  306.     endif
  307.  
  308.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  309.         Debug-Output "MakeServicesEntry failed for SCSI"
  310.         goto finish_InstallOption
  311.     endif
  312.  
  313.     endif
  314.  
  315.     set Status = STATUS_SUCCESSFUL
  316. finish_InstallOption = +
  317.     ForListDo $(DrivesToFree)
  318.     LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
  319.     EndForListDo
  320.  
  321.     Return $(Status)
  322.  
  323.  
  324. [Install-AddCopyOption]
  325.  
  326.     ;
  327.     ; Add the files to the copy list
  328.     ;
  329.     AddSectionKeyFileToCopyList   Files-ScsiMiniportDrivers         +
  330.                   $(MiniportDriver)                 +
  331.                   $(SrcDir)                      +
  332.                   $(!STF_WINDOWSSYSPATH)\drivers
  333.  
  334.     exit
  335.  
  336.  
  337. [Install-DoCopyOption]
  338.  
  339.     ;
  340.     ; Copy files in the copy list
  341.     ;
  342.     CopyFilesInCopyList
  343.     exit
  344.  
  345. ;-------------------------------------------------------------------------
  346. ; 4. DeInstallOption:
  347. ;
  348. ; FUNCTION:  To remove files representing Option
  349. ;            To remove the registry entry corresponding to the Option
  350. ;
  351. ; INPUT:     $($0):  Language to use
  352. ;            $($1):  OptionID to install
  353. ;
  354. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  355. ;                            STATUS_NOLANGUAGE |
  356. ;                            STATUS_USERCANCEL |
  357. ;                            STATUS_FAILED
  358. ;-------------------------------------------------------------------------
  359. [DeInstallOption]
  360.     ;
  361.     ; Set default values for
  362.     ;
  363.     set Status   = STATUS_FAILED
  364.     ;
  365.     ; extract parameters
  366.     ;
  367.     set Option   = $($1)
  368.  
  369.     ;
  370.     ; Check if the language requested is supported
  371.     ;
  372.     set LanguageList = ^(LanguagesSupported, 1)
  373.     Ifcontains(i) $($0) in $(LanguageList)
  374.     else
  375.     set Status = STATUS_NOLANGUAGE
  376.     goto finish_DeInstallOption
  377.     endif
  378.     read-syms Strings$($0)
  379.  
  380.     ;
  381.     ; check to see if Option is supported.
  382.     ;
  383.  
  384.     set OptionList = ^(Options, 0)
  385.     ifcontains $(Option) in $(OptionList)
  386.     else
  387.     goto finish_DeInstallOption
  388.     endif
  389.     set OptionList = ""
  390.  
  391.     ;
  392.     ; fetch details about option
  393.     ;
  394.  
  395.     set MiniportDriver = #(Options, $(Option), 1)
  396.     set MiniportFile   = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  397.     set FilePath       = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
  398.  
  399.     ;
  400.     ; check to see if file is installed
  401.     ; if not give success
  402.     ;
  403.  
  404.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
  405.     ifstr(i) $(STATUS) == "NO"
  406.     set Status = STATUS_SUCCESSFUL
  407.     goto finish_DeInstallOption
  408.     endif
  409.  
  410.     shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  411.     ifstr(i) $($R0) != "STATUS_SUCCESSFUL"
  412.     ; this could happen if there is no start value or there is no
  413.     ; key, in which case the option is not installed
  414.     set Status = STATUS_SUCCESSFUL
  415.     goto finish_DeInstallOption
  416.     endif
  417.  
  418.     ifstr(i) $($R1) == $(!SERVICE_BOOT_START)
  419.     shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "WARNING" $(String3)
  420.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  421.         goto do_removal
  422.     endif
  423.     ifstr(i) $($R1) == "CANCEL"
  424.         goto finish_DeInstallOption
  425.     endif
  426.     endif
  427.  
  428. do_removal =+
  429.     ;
  430.     ; disable the registry entry
  431.     ;
  432.  
  433.     shell "registry.inf" RemoveServicesEntry $(MiniportDriver)
  434.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  435.     Debug-Output "SCSI.INF: Failed to shell RemoveServicesEntry"
  436.     goto finish_DeInstallOption
  437.     endif
  438.  
  439.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  440.     Debug-Output "SCSI.INF: Failed to disable services entry"
  441.     goto finish_DeInstallOption
  442.     endif
  443.  
  444.     set Status = STATUS_SUCCESSFUL
  445.  
  446. finish_DeInstallOption =+
  447.     return $(Status)
  448.  
  449.  
  450. ;-------------------------------------------------------------------------
  451. ; 5. GetInstalledOptions:
  452. ;
  453. ; FUNCTION:  To find out the list of options which are installed
  454. ;
  455. ; INPUT:     $($0): Language to Use
  456. ;
  457. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  458. ;                            STATUS_FAILED
  459. ;
  460. ;            $($R1): List of options installed
  461. ;            $($R2): Option installed Text List
  462. ;-------------------------------------------------------------------------
  463. [GetInstalledOptions]
  464.     set Status = STATUS_FAILED
  465.     set InstalledOptions = {}
  466.     set InstalledOptionsText = {}
  467.  
  468.     ;
  469.     ; Check if the language requested is supported
  470.     ;
  471.     set LanguageList = ^(LanguagesSupported, 1)
  472.     Ifcontains(i) $($0) in $(LanguageList)
  473.     else
  474.     set Status = STATUS_NOLANGUAGE
  475.     goto finish_GetInstalledOptions
  476.     endif
  477.  
  478.     set OptionList = ^(Options, 0)
  479.     ForListDo $(OptionList)
  480.     set MiniportDriver = #(Options, $($), 1)
  481.     set MiniportFile   = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  482.     set FilePath       = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
  483.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
  484.     ifstr(i) $(STATUS) == "YES"
  485.         shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  486.         ifint $($ShellCode) == $(!SHELL_CODE_OK)
  487.         ifstr(i) $($R0) == STATUS_SUCCESSFUL
  488.             ifstr(i) $($R1) != $(!SERVICE_DISABLED)
  489.  
  490.             set OptionText = #(OptionsText$($0), $($), 1)
  491.             set InstalledOptions     = >($(InstalledOptions), $($))
  492.             set InstalledOptionsText = >($(InstalledOptionsText), $(OptionText))
  493.  
  494.             endif
  495.         endif
  496.         endif
  497.     endif
  498.     EndForListDo
  499.     set Status = STATUS_SUCCESSFUL
  500. finish_GetInstalledOptions =+
  501.     Return $(Status) $(InstalledOptions) $(InstalledOptionsText)
  502.  
  503.  
  504. [ProgressCopyENG]
  505.     ProCaption   = "Windows NT Setup"
  506.     ProCancel    = "Cancel"
  507.     ProCancelMsg = "Windows NT is not correcly installed.  Are you sure you want "+
  508.            "to cancel copying files?"
  509.     ProCancelCap = "Setup Message"
  510.     ProText1     = "Copying:"
  511.     ProText2     = "To:"
  512.  
  513. [StringsENG]
  514.     String1 = "SCSI Adapter"
  515.     String2 = "Please enter the full path to the SBCDNT "+
  516.           "files.  Then choose Continue."
  517.     String3 = "The SCSI Adapter has been marked as a boot device.  Removing "+
  518.           "it may cause the system not to boot."$(!LF)$(!LF)"Are you sure "+
  519.           "you want to remove the Adapter."
  520.  
  521. [Source Media Descriptions]
  522.     1  = "SBCDNT"  ,                  TAGFILE = SbcdNt.sys
  523.     2  = "Sound Blaster 16 Driver"  , TAGFILE = disk1
  524.  
  525. [Files-ScsiMiniportDrivers]
  526.  SbcdNt = 1,sbcdnt.sys , SIZE=25088
  527.  
  528.  
  529. [Installable.Drivers]
  530. soundblaster = 2:sb16snd.dll, "wave,MIDI,aux,mixer", "Creative Sound Blaster 16" ,,,
  531.  
  532. [soundblaster]
  533. 2:sb16snd.sys
  534. 2:cspmannt.sys
  535. 2:cspmannt.dll
  536. 2:wfm0006.acv
  537. 2:wfm0007.acv
  538. 2:wfm0011.acv
  539. 2:wfm0200.acv
  540. 2:wfm0202.acv
  541. 2:wfm0203.acv
  542.